home *** CD-ROM | disk | FTP | other *** search
- -- card: 19418 from stack: in.3r
- -- bmap block id: 0
- -- flags: 0000
- -- background id: 13187
- -- name: ART HyperText Trick
- ----- HyperTalk script -----
- on closecard
- put empty into card field theword
- pass closecard
- end closecard
-
-
-
- -- part 1 (field)
- -- low flags: 01
- -- high flags: 0000
- -- rect: left=60 top=307 right=325 bottom=224
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: theWord
-
-
- -- part 2 (field)
- -- low flags: 00
- -- high flags: 4007
- -- rect: left=59 top=46 right=265 bottom=508
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: description
- ----- HyperTalk script -----
- on mousewithin
- --
- --hypertext technique by Steve Drazga, ART Incorporated
- --if you use this in your scripts please include these 2 lines.
- --
- if the locktext of the target is true then --unlock the field if
- set locktext of target to false --it is locked.
- end if
-
- if selection is not empty then --something was selected
- put selection into SelectedWord
- if space is in SelectedWord then --the user selected more than 1 word
- click at loc of target --so we will clear the selection
- exit mousewithin --and exit to wait for another selection
- end if
-
- put selectedWord into card field theWord
-
- end if
- end mousewithin
-
-
- -- part contents for background part 4
- ----- text -----
- 2
-
- -- part contents for background part 2
- ----- text -----
- HyperText Trick
-
- -- part contents for card part 2
- ----- text -----
- --DOUBLE CLICK on any word in this field for an example
- --
- --This trick lets the user double click on a word to activate a hypertext link.
- --The 'on mousewithin' script goes into the target field.
- --Look at the script of the 'syntax' fields on the XCMD or XFCN card for a
- --varation of this method.
-
-
- on mousewithin
- --
- --hypertext technique by Steve Drazga, AnalytX
- --if you use this in your scripts please include these 2 lines.
- --
- if the locktext of the target is true then
- set locktext of target to false --unlock the field if it is locked
- end if
-
- if selection is not empty then --something was selected
- put selection into SelectedWord
- if space is in SelectedWord then --the user selected more than 1 word
- click at loc of target --so we will clear the selection
- exit mousewithin --and exit to wait for another selection
- end if
- --
- --this is the section where you do something with the selection
- --You can bring up a pop up note or you can go to another card.
- --
- end if
- end mousewithin
-
-
- -- part contents for background part 18
- ----- text -----
- Scripts